<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>消息</title>
</head>
<body style="overflow-x: hidden;">
{if $show}
<div class="row" style="display: inline-block; margin-bottom: 30px;">
    <div class="col-md-12">
        <ol class="breadcrumb" style="background: #FFFFFF; border-bottom: 1px solid #dfdfdf; border-radius: 0;">
            <li><a href="?c=admin">后台首页</a></li>
            <li><a href="?c=message&action=show">系统消息管理</a></li>
            <li class="active">所有系统消息</li>
        </ol>
    </div>
</div>

<div class="row">
    <div class="col-md-12">
        <form action="" method="post">
            <table class="table table-bordered" style="width: 90%; margin: auto;">
                <tr>
                    <th>系统消息</th>
                    <th>操作</th>
                    <th>
                        <label for="allAd">全选 </label>
                        <input type="checkbox" id="allAd">
                    </th>
                </tr>
                {foreach $allMessage as $k=>$v}
                <tr>
                    <td>{$v[0]}</td>
                    <td>
                        <a href="?c=article&action=delete&id={$value['id']}">删除</a>
                    </td>
                    <td>
                        <label for="{$value['id']}">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
                        <input type="checkbox" id="{$value['id']}" class="choose" name="checked[]" value="{$value['id']}">
                    </td>
                </tr>
                {/foreach}
                <script type="text/javascript">
                    $(document).on('click','#allAd',function () {
                        $(".choose").prop("checked",$(this).prop("checked"));
                    });
                </script>
                <tr>
                    <td colspan="2">
                        {$allPage}
                    </td>
                    <td style="vertical-align: middle">
                        <input type="submit" name="delete" value="删除" class="btn btn-danger">
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>
{/if}

{if $send}
<div class="row" style="display: inline-block; margin-bottom: 30px;">
    <div class="col-md-12">
        <ol class="breadcrumb" style="background: #FFFFFF; border-bottom: 1px solid #dfdfdf; border-radius: 0;">
            <li><a href="?c=admin">后台首页</a></li>
            <li><a href="?c=message&action=show">系统消息管理</a></li>
            <li class="active">所有系统消息</li>
        </ol>
    </div>
</div>

<div class="row">
    <div class="col-md-10">
    <form class="register-form" action="?c=message&action=send" method="post">
        <table class="table table-bordered" style=" margin: auto;">
            <tr>
                <td class="text-center">消息内容</td>
                <td><textarea value="" name="message" id="message" type="text" class="form-control" style="height: 200px;"></textarea></td>
            </tr>
            <tr><td><br></td></tr>
            <tr>
                <td colspan="2" class="text-center">
                    <input type="submit" value="发送" name="send" class="btn btn-success">
                </td>
            </tr>
        </table>
    </form>
    </div>
</div>
{/if}
</body>
</html>